import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            name: 'home',
            redirect:'/start',
            component: () => import('../views/Home/index.vue'),
            children: [
                {
                    path: '/start',
                    name: 'Start',
                    component: () => import('../views/Home/Start/index.vue'),
                },
                {
                    path: '/classification',
                    name: 'Classification',
                    component: () => import('../views/Home/Classification/index.vue'),
                },
                {
                    path: '/car',
                    name: 'Car',
                    component: () => import('../views/Home/Car/index.vue'),
                },
                {
                    path: '/user',
                    name: 'User',
                    component: () => import('../views/Home/User/index.vue'),
                }
            ],
        },
        {
            path: '/search',
            name: 'search',
            component: () => import('../views/Other/Search/index.vue'),
        },
        {
            path: '/shop',
            name: 'shop',
            component: () => import('../views/Other/Shop/index.vue'),
        }
        // {
        //   path: '/about',
        //   name: 'about',
        //   // route level code-splitting
        //   // this generates a separate chunk (About.[hash].js) for this route
        //   // which is lazy-loaded when the route is visited.
        //   component: () => import('../views/AboutView.vue')
        // }
    ]
})

export default router
